home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / games / ted5.zip / MENU.H < prev    next >
C/C++ Source or Header  |  1993-02-04  |  2KB  |  79 lines

  1. /////////////////////////////////////////////////////////////////
  2. //
  3. // Pull-Down menu interface .H file
  4. //
  5. /////////////////////////////////////////////////////////////////
  6. typedef struct { char *item_name;
  7.          void (*routine)(void);
  8.          char shiftflag;
  9.          char hotkey;
  10.            } MenuDef;
  11.  
  12. typedef struct { int num_items;
  13.          MenuDef *menu_def;
  14.          char *menu_name;
  15.            } MBarDef;
  16.  
  17. typedef struct { int menux;
  18.          int menunamelen;
  19.          int menuwidth;
  20.            } MInfoType;
  21.  
  22. typedef struct { char *text;
  23.          int xoff,yoff,border;
  24.            } btype;
  25.  
  26. typedef struct { char *text;
  27.          int width,height,numbuttons;
  28.          btype *buttons;
  29.          void (*hook)(int x,int y);
  30.            } DialogDef;
  31.  
  32. typedef struct { int x,y,w,h;
  33.          void _seg *buffer;
  34.            } BackSaveStr;
  35.  
  36. #define SCindex 0x3C4
  37. #define SCmapmask 2
  38. #define GCindex 0x3CE
  39. #define GCreadmap 4
  40. #define GCmode 5
  41. #define crtcaddr 0x3d4
  42.  
  43. #define NUMFLASHES    10
  44. #define ALT        0x38
  45. #define CTRL        0x1d
  46.  
  47. #define MAXFDNAMES     40
  48. extern struct ffblk f;        // more info from GetPath
  49.  
  50.  
  51. void extern InitDesktop(MBarDef *menubar,int initmouse);
  52. void extern DeskEventLoop(void (*UserRoutine)(void),void (*ConstantRoutine)(void));
  53. void extern ClearScreen(void);
  54. void extern RedrawDesktop(void);
  55. void extern SaveBackground(int x,int y,int w,int h);
  56. void extern RestoreBackground(void);
  57. int extern DoDialog(DialogDef *TheDialog);
  58. void extern ErrDialog(char *string,char *bstring);
  59. void extern DrawBorder(int x,int y,int w,int h,int b);
  60. int extern CheckButtons(DialogDef *TheDialog);
  61. int extern CheckButtonsRet(DialogDef *TheDialog);
  62. void extern DrawDialog(DialogDef *TheDialog,int saveback);
  63. void extern GetButtonXY(DialogDef *TheDialog,int button,unsigned *x,unsigned *y);
  64. void extern GetDialogXY(DialogDef *TheDialog,unsigned *x,unsigned *y);
  65. int extern CheckList(int x,int y,int w,int h,void (*oncode)(),void (*offcode)(),int blink);
  66. int extern Message(char *mstring);
  67.  
  68. //
  69. // RETURNS 0=OK,-1=NO FILES MATCH FILTER,-2=CANCELED
  70. //
  71. extern char NameList[MAXFDNAMES][13];
  72. int GetPath(char *string,char *filter,char *path);
  73. int GetList(char *string,int numnames);
  74.  
  75. static void FDon(int x,int y,int w);
  76. static void FDoff(int x,int y,int w);
  77. static void CancelOn(int x,int y);
  78. static void CancelOff(int x,int y);
  79.